package com.chj.mock;

import java.util.HashMap;
import java.util.Map;

import com.chj.entity.UserInfo;

public class UserInfoMock {

	private static Map<String, UserInfo> userMap = new HashMap<String, UserInfo>();

	static {
		UserInfo user = null;
		for (int i = 0; i < 10; i++) {
			user = new UserInfo();
			user.setUsername("derek00" + i);
			user.setAuthpwd("Pass1234");
			if (i % 2 == 0) {
				user.setRole("select");
			} else {
				user.setRole("update");
			}
			userMap.put(user.getUsername(), user);
		}
	}

	public static UserInfo getUser(String username) {
		return userMap.get(username);
	}
}
